import { createRouter, createWebHashHistory } from 'vue-router';
import Login from "@/views/login.vue";
import adminIndex from "@/views/adminIndex.vue";
import user from "@/views/admin/user.vue";
import decisionConsulting from "@/views/admin/decisionConsulting.vue";
import creativeAchievement from "@/views/admin/creativeAchievement.vue";
import intellectualProperty from "@/views/admin/intellectualProperty.vue";
import totalWork from "@/views/admin/totalWork.vue";
import researchProject from "@/views/admin/researchProject.vue";
import academicWorks from "@/views/admin/academicWorks.vue";
import userIndex from '@/views/userIndex.vue';
import personal from '@/views/user/personal.vue';
import researchProjectUser from '@/views/user/researchProjectUser.vue';
import totalWorkUser from '@/views/user/totalWorkUser.vue';
import academicWorksUser from '@/views/user/academicWorksUser.vue'
import decisionConsultUser from '@/views/user/decisionConsultUser.vue';
import creativeAchieveUser from '@/views/user/creativeAchieveUser.vue';
import intellectualPropertyUser from '@/views/user/intellectualPropertyUser.vue';
import achieveTransferUser from '@/views/user/achieveTransferUser.vue';
import natureResearchAwardUser from '@/views/user/natureResearchAwardUser.vue';
import humanResearchAwardUser from '@/views/user/humanResearchAwardUser.vue';
import networkCultureUser from '@/views/user/networkCultureUser.vue'
import academicPapersUser from '@/views/user/academicPapersUser.vue';
import scientificActivityUser from '@/views/user/scientificActivityUser.vue';
import researchPlatformUser from '@/views/user/researchPlatformUser.vue';
import twoAdminIndex from "@/views/twoAdminIndex.vue";
import twoUser from "@/views/twoAdmin/twoUser.vue";
import researchProjectTwo from '@/views/twoAdmin/researchProjectTwo.vue';
import totalWorkTwo from '@/views/twoAdmin/totalWorkTwo.vue';
import academicWorksTwo from '@/views/twoAdmin/academicWorksTwo.vue'
import decisionConsultTwo from '@/views/twoAdmin/decisionConsultTwo.vue';
import creativeAchieveTwo from '@/views/twoAdmin/creativeAchieveTwo.vue';
import intellectualPropertyTwo from '@/views/twoAdmin/intellectualPropertyTwo.vue';
import achieveTransferTwo from '@/views/twoAdmin/achieveTransferTwo.vue';
import naturaResearchAwardTwo from '@/views/twoAdmin/naturaResearchAwardTwo.vue';
import humanResearchAwardTwo from '@/views/twoAdmin/humanResearchAwardTwo.vue';
import networkCultureTwo from '@/views/twoAdmin/networkCultureTwo.vue'
import academicPapersTwo from '@/views/twoAdmin/academicPapersTwo.vue';
import scientificActivityTwo from '@/views/twoAdmin/scientificActivityTwo.vue';
import researchPlatformTwo from '@/views/twoAdmin/researchPlatformTwo.vue';

const routes = [
  {
    path: "/",
    redirect: "/login",
  },
  {
    path: "/login",
    name: "login",
    component: Login,
  },
  // {
  //   path: "/register",
  //   name: "register",
  //   component: register,
  // },
  {
    path: "/adminIndex",
    name: "adminIndex",
    component: adminIndex,
    children: [
      {
        path: "user",
        name: "user",
        meta: { title: '用户管理' },
        component: user,
      },
      {
        path: "totalWork",
        name: "totalWork",
        meta: { title: '总工作量' },
        component: totalWork,
      },
      {
        path: "researchProject",
        name: "researchProject",
        meta: { title: '科研项目工作量' },
        component: researchProject,
      },
      {
        path: "academicWorks",
        name: "academicWorks",
        meta: { title: '学术著作' },
        component: academicWorks,
      },
      {
        path: "decisionConsulting",
        name: "decisionConsulting",
        meta: { title: '决策咨询类' },
        component: decisionConsulting,
      },
      {
        path: "creativeAchievement",
        name: "creativeAchievement",
        meta: { title: '创作成果类' },
        component: creativeAchievement,
      },
      {
        path: "intellectualProperty",
        name: "intellectualProperty",
        meta: { title: '知识产权类' },
        component: intellectualProperty,
      }
    ],
  },
  {
    path: "/userIndex",
    name: "userIndex",
    component: userIndex,
    children: [
      {
        path: "personal",
        name: "personal",
        meta: { title: '个人中心' },
        component: personal,
      },
      {
        path: "totalWorkUser",
        name: "totalWorkUser",
        meta: { title: '总工作量' },
        component: totalWorkUser,
      },
      {
        path: "researchProjectUser",
        name: "researchProjectUser",
        meta: { title: '科研工作量' },
        component: researchProjectUser,
      },
      {
        path: "academicWorksUser",
        name: "academicWorksUser",
        meta: { title: '学术著作' },
        component: academicWorksUser,
      },
      {
        path: "decisionConsultUser",
        name: "decisionConsultUser",
        meta: { title: '决策咨询类' },
        component: decisionConsultUser,
      },
      {
        path: "creativeAchieveUser",
        name: "creativeAchieveUser",
        meta: { title: '创作成果类' },
        component: creativeAchieveUser,
      },
      {
        path: "intellectualPropertyUser",
        name: "intellectualPropertyUser",
        meta: { title: '知识产权类' },
        component: intellectualPropertyUser,
      },
      {
        path: "achieveTransferUser",
        name: "achieveTransferUser",
        meta: { title: '成果转化类' },
        component: achieveTransferUser,
      },
      {
        path: "natureResearchAwardUser",
        name: "natureResearchAwardUser",
        meta: { title: '科研奖项(自然科学)' },
        component: natureResearchAwardUser,
      },
      {
        path: "humanResearchAwardUser",
        name: "humanResearchAwardUser",
        meta: { title: '科研奖项(人文社科)' },
        component: humanResearchAwardUser,
      },
      {
        path: "networkCultureUser",
        name: "networkCultureUser",
        meta: { title: '网络文化成果' },
        component: networkCultureUser,
      },
      {
        path: "academicPapersUser",
        name: "academicPapersUser",
        meta: { title: '学术论文' },
        component: academicPapersUser,
      },
      {
        path: "scientificActivityUser",
        name: "scientificActivityUser",
        meta: { title: '科技活动' },
        component: scientificActivityUser,
      },
      {
        path: "researchPlatformUser",
        name: "researchPlatformUser",
        meta: { title: '重要平台' },
        component: researchPlatformUser,
      },
    ],
  },
  {
    path: "/twoAdminIndex",
    name: "twoAdminIndex",
    component: twoAdminIndex,
    children: [
      {
        path: "twoUser",
        name: "twoUser",
        meta: { title: '用户管理' },
        component: twoUser,
      },
      {
        path: "totalWorkTwo",
        name: "totalWorkTwo",
        meta: { title: '总工作量' },
        component: totalWorkTwo,
      },
      {
        path: "researchProjectTwo",
        name: "researchProjectTwo",
        meta: { title: '科研工作量' },
        component: researchProjectTwo,
      },
      {
        path: "academicWorksTwo",
        name: "academicWorksTwor",
        meta: { title: '学术著作' },
        component: academicWorksTwo,
      },
      {
        path: "decisionConsultTwo",
        name: "decisionConsultTwo",
        meta: { title: '决策咨询类' },
        component: decisionConsultTwo,
      },
      {
        path: "creativeAchieveTwo",
        name: "creativeAchieveTwo",
        meta: { title: '创作成果类' },
        component: creativeAchieveTwo,
      },
      {
        path: "intellectualPropertyTwo",
        name: "intellectualPropertyTwo",
        meta: { title: '知识产权类' },
        component: intellectualPropertyTwo,
      },
      {
        path: "achieveTransferTwo",
        name: "achieveTransferTwo",
        meta: { title: '成果转化类' },
        component: achieveTransferTwo,
      },
      {
        path: "naturaResearchAwardTwo",
        name: "naturaResearchAwardTwo",
        meta: { title: '科研奖项(自然科学)' },
        component: naturaResearchAwardTwo,
      },
      {
        path: "humanResearchAwardTwo",
        name: "humanResearchAwardTwo",
        meta: { title: '科研奖项(人文社科)' },
        component: humanResearchAwardTwo,
      },
      {
        path: "networkCultureTwo",
        name: "networkCultureTwo",
        meta: { title: '网络文化成果' },
        component: networkCultureTwo,
      },
      {
        path: "academicPapersTwo",
        name: "academicPapersTwo",
        meta: { title: '学术论文' },
        component: academicPapersTwo,
      },
      {
        path: "scientificActivityTwo",
        name: "scientificActivityTwo",
        meta: { title: '科技活动' },
        component: scientificActivityTwo,
      },
      {
        path: "researchPlatformTwo",
        name: "researchPlatformTwo",
        meta: { title: '重要平台' },
        component: researchPlatformTwo,
      },
    ],
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;

